package dfbz.com.controller.user;

import dfbz.com.controller.BaseServlet;
import dfbz.com.service.UserService;
import dfbz.com.service.impl.UserServiceImpl;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet("/user/*")
public class UserServlet extends BaseServlet {

    private UserService userService = new UserServiceImpl();


    public void list(HttpServletRequest request, HttpServletResponse response){
        try {
            String currentPage = request.getParameter("currentPage");
            int page = 1;
            if(null != currentPage){
                page = Integer.parseInt(currentPage);
            }
            response.sendRedirect(request.getContextPath() + "/view/userList?page="+page);
        } catch (Exception e){
            e.printStackTrace();
        }
    }

}
